package com.athuiju.hr.controller.front;


import com.athuiju.commonutils.R;
import com.athuiju.hr.entity.VisitEmphasis;
import com.athuiju.hr.service.VisitEmphasisService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wzh
 * @since 2022-01-02
 */
@RestController
@RequestMapping("/hr/visit-emphasis")
@Api(value="职业生涯看重点列表controller",tags={"小程序职业生涯看重点列表操作接口"})
public class VisitEmphasisController {
    @Autowired
    public VisitEmphasisService visitEmphasisService;

    @ApiOperation(value = "查询全部职业生涯看重点controller")
    @GetMapping("visitEmphasisAll")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = VisitEmphasis.class),
    })
    public R list(){
        List<VisitEmphasis> list=visitEmphasisService.list(null);
        return  R.ok().data("item",list);
    }




    @ApiOperation(value = "根据id查询职业生涯看重点信息controller")
    @GetMapping("getVisitEmphasisInfo/{id}")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = VisitEmphasis.class),
    })
    public R getVisitEmphasisInfo(@ApiParam(name = "id",value = "岗位id",required = true)
                              @PathVariable String id){
        VisitEmphasis visitEmphasis=visitEmphasisService.getById(id);
        return  R.ok().data("visitEmphasis",visitEmphasis);
    }

}
